﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Lesson8_code1 : MonoBehaviour
{
    public Transform target;
    //z轴偏移
    public float zOffset = 2;
    //y轴偏移
    public float yOffset = 0.5f;
    // Update is called once per frame
    void Update()
    {
        this.transform.position = Vector3.Lerp(this.transform.position, target.position - new Vector3(0, -7 * yOffset, 4 * zOffset), Time.deltaTime);
    }
}
